export const FORM_TYPE_INDICATOR = 0
export const FORM_TYPE_TASK = 1
export const FORM_TYPE_DECLARATION = 2
export const FORM_TYPE_RATING = 3

//任务状态 0, "草稿"; 1, "待提交"; 2, "待审核"; 3, "审核通过"; 4, "驳回"; 5, "已结束"
export const STATUS_TYPE_DRAFT = 0
export const STATUS_TYPE_PENDING = 1
export const STATUS_TYPE_REVIEW = 2
export const STATUS_TYPE_APPROVED = 3
export const STATUS_TYPE_REJECTED = 4
export const STATUS_TYPE_FINISH = 5
export const STATUS_TYPE_PUBLISHED = 6
export const STATUS_TYPE_TERMINATED = 7
/**
 * 表单类型
 */
export const formType = [
  {
    key: FORM_TYPE_INDICATOR,
    icon: 'md-create',
    name: '指标类表单',
    tip: '适用于数据收集',
    noOnline: true,
    formCategory: 'indicator'
  },
  {
    key: FORM_TYPE_TASK,
    icon: 'md-bookmarks',
    name: '任务类表单',
    tip: '适用于任务跟踪',
    noOnline: true,
    formCategory: 'task'
  },
  {
    key: FORM_TYPE_DECLARATION,
    icon: 'md-thumbs-up',
    name: '申报类表单',
    tip: '适用于奖项申报',
    noOnline: false,
    formCategory: 'declaration'
  },
  {
    key: FORM_TYPE_RATING,
    icon: 'md-trending-up',
    name: '评分评选类表单',
    tip: '适用于评分',
    noOnline: false,
    formCategory: 'rating'
  }
]
/**
 * 制表状态
 */
export const formStatus = [
  { key: STATUS_TYPE_DRAFT, name: '草稿' },
  { key: STATUS_TYPE_PENDING, name: '制表中' },
  { key: STATUS_TYPE_REVIEW, name: '制表审批中' },
  { key: STATUS_TYPE_APPROVED, name: '制表完成' },
  { key: STATUS_TYPE_REJECTED, name: '驳回' },
  { key: STATUS_TYPE_FINISH, name: '已发布' },
  { key: STATUS_TYPE_PUBLISHED, name: '已发起填报' },
  { key: STATUS_TYPE_TERMINATED, name: '结束' }
]

/**
 * 填报单据状态
 */
export const reportStatus = [
  { key: STATUS_TYPE_DRAFT, name: '草稿' },
  { key: STATUS_TYPE_PENDING, name: '待提交' },
  { key: STATUS_TYPE_REVIEW, name: '待审核' },
  { key: STATUS_TYPE_APPROVED, name: '审核通过' }
]

/**
 * 填报单据颜色
 */
export const reportColorStatus = {
  0: '#7f7f7f', //灰色
  1: '#2f83ff', //蓝色
  2: '#2f83ff', //蓝色
  3: '#04b49c' //绿色
}

/**
 * 评分查询状态
 */
export const searchRateStatus = [
  { key: STATUS_TYPE_DRAFT, name: '待评分', color: '#7f7f7f' },
  { key: STATUS_TYPE_PENDING, name: '评分中', color: '#2f83ff' },
  { key: STATUS_TYPE_REVIEW + ',' + STATUS_TYPE_APPROVED, name: '已完成', color: '#04b49c' }
]

/**
 * 评分查询状态
 */
export const searchParentRateStatus = [
  { key: STATUS_TYPE_DRAFT, name: '待评分', color: '#7f7f7f' },
  { key: STATUS_TYPE_REVIEW + ',' + STATUS_TYPE_PENDING, name: '评分中', color: '#2f83ff' },
  { key: STATUS_TYPE_APPROVED, name: '已完成', color: '#04b49c' }
]

/**
 * 评分状态
 */
export const rateStatus = [
  { key: STATUS_TYPE_DRAFT, name: '待评分', color: '#7f7f7f' },
  { key: STATUS_TYPE_PENDING, name: '评分中', color: '#2f83ff' },
  { key: STATUS_TYPE_REVIEW, name: '已完成', color: '#04b49c' },
  { key: STATUS_TYPE_APPROVED, name: '已完成', color: '#04b49c' }
]

/**
 * 评分状态
 */
export const parentRateStatus = [
  { key: STATUS_TYPE_DRAFT, name: '待评分', color: '#7f7f7f' },
  { key: STATUS_TYPE_PENDING, name: '评分中', color: '#2f83ff' },
  { key: STATUS_TYPE_REVIEW, name: '评分中', color: '#2f83ff' },
  { key: STATUS_TYPE_APPROVED, name: '已完成', color: '#04b49c' }
]

/**
 * 流程单据状态
 */
export const bpmStatus = [
  { key: STATUS_TYPE_DRAFT, name: '草稿' },
  { key: STATUS_TYPE_PENDING, name: '待提交' },
  { key: STATUS_TYPE_REVIEW, name: '待审核' },
  { key: STATUS_TYPE_APPROVED, name: '审核通过' },
  { key: STATUS_TYPE_REJECTED, name: '驳回' },
  { key: STATUS_TYPE_FINISH, name: '已完成' }
]

/**
 * 流程单据颜色
 */
export const colorStatus = {
  0: '#7f7f7f', //灰色
  1: '#2f83ff', //蓝色
  2: '#2f83ff', //蓝色
  3: '#2f83ff', //蓝色
  4: '#7f7f7f', //灰色
  5: '#04b49c', //绿色
  6: '#04b49c', //绿色
  7: '#7f7f7f' //灰色
}

/**
 * 填报单据颜色
 */
export const isPassedColorStatus = {
  '': '#7f7f7f', //灰色
  0: '#ff4d4f', //红色
  1: '#04b49c' //绿色
}

// 表单类型
export const FORM_TYPES = {
  INDICATOR: 0,
  TASK: 1,
  APPLY: 2,
  RATE: 3
}

// 0 制表；1 单据填报 2 单据审批
export const TODO_TYPE = {
  CREATE: 0,
  WRITE: 1,
  APPROVAL: 2
}

export const FORM_STATUS = {
  DRAFT: 0, // 草稿
  WAIT_SUBMIT: 1, // 待提交
  WAIT_REVIEW: 2, // 待审核
  PASS_REVIEW: 3, // 审核通过
  DIS_ALLOW: 4, // 驳回
  FINISHED: 5, // 已完成
  PUBLISHED: 6, // 已发起
  TERMINATED: 7 // 结束
}
